<?php
$himgs = array('ghostwei', 'knife', 'shoes', 'seaside');
?>
<div id="container">
	<div id="header">
		<div style="position;fixed">
		<div id="cmsdream"><a href="<?php echo $this->url('home'); ?>/" title="<?php echo $this->setting->blogname; ?>">www.cmsdream.com</a></div>		
		<div id="menu">
			<div class="menu-left"></div>
			<ul><?php
				function menu_children($m) {
					$str = "<ul style=\"display:none;\">";
					foreach($m as $key => $menu) {
						$str .= "<li><a ";
						if(!empty($menu->description)) $str .= "title=\"".$menu->description."\" ";
						if(!empty($menu->target)) $str .= "target=\"".$menu->target."\" ";
						$str .= "href=\"".$menu->url."\">";
						$str .= $menu->title;
						$str .= "</a>";
						if(!empty($menu->children)) $str .= menu_children($menu->children);
						$str .= "</li>";
					}
					$str .= "</ul>";
					return $str;
				}
				foreach($this->cache->get_nav_menus('cmsdream') as $key => $menu) {
					echo "<li><a ";
					if(!empty($menu->description)) echo "title=\"".$menu->description."\" ";
					if(!empty($menu->target)) echo "target=\"".$menu->target."\" ";
					echo "href=\"".$menu->url."\">";
					echo $menu->title;
					echo "</a>";
					if(!empty($menu->children)) echo menu_children($menu->children);
					echo "</li>";
				}
				//echo '<li><a href="'.$this->url('home').'/set-client/3g">3G</a></li>';
				echo '<li><a href="http://www.ofaye.com/">倾听王菲</a></li>';
				echo '<li><a href="http://www.hookbag.ca/?_tk=19" target="_blank">HookBag<sup>®</sup></a></li>';
			?></ul>
			<div class="menu-bottom"><div class="bg"></div></div>
		</div>
		</div>
		<div class="clear"></div>
		<div id="top">
			<div class="corner1"></div>
			<div class="corner2"></div>
			<div id="feng"><img src="<?php echo $this->setting->static; ?>/img/headers/header-<?php echo $himgs[rand(0, (count($himgs) - 1))]; ?>.jpg" /></div>
			<div class="bookmark">
				<div class="information">
					<h1 id="title"><a href="<?php echo $this->url('home'); ?>/"><?php echo $this->setting->blogname; ?></a></h1>
					<h2 id="description"><?php echo $this->setting->blogdescription; ?></h2>
				<div>
			</div>
		</div>
	</div>	
</div>
